<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body>
<div>
    <form th:action="@{/SpringBoot/team/save}" >
        <div class="layui-form-item" style="visibility: hidden">
            <label class="layui-form-label">教师工号</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="hidden" name="teacherName" placeholder="请输入教师工号" th:value="${username}">
            </div>
        </div>
        <input type="hidden" name="id" th:if="${team}" th:value="${team.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">团队名</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="team_name" placeholder="请输入团队名" th:value="${team?.team_name}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">所在实验室</label>
            <div class="layui-input-block">
                <select name="lab_id" style="width: 190px;height: 38px">
                    <option th:label="请选择实验室"></option>
                    <!--<option th:if="${labs.indexOf(lab) == 0}">选择实验室</option>-->
                    <option  th:each="lab:${labs}" th:value="${lab.getId()}" th:label="${lab.getName()}"></option>

                </select>
<!--                <input class="layui-input" type="text" name="lab_id" placeholder="请输入所在实验室" th:value="${team?.lab_id}">-->
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">团队人数</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="count" placeholder="请输入团队人数" th:value="${team?.count}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">团队类型</label>
            <div class="layui-input-inline">
                <select name="type"  style="width: 190px;height: 38px">
                    <option value="0">比赛团队</option>
                    <option value="1">项目团队</option>
                    <option value="2">其他</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
<script th:replace="/common/template :: script"></script>
</body>
</html>